/*
 * Use the Pythagorean theorem to
 * find the length of the hypotenuse
 * given the lengths of two opposing sides.
 *
 * Call this Hypot.java
 */
class Hypot {
    public static void main(String args[]) {
        double x, y, z;

        x = 3;
        y = 4;

        // Notice that sqrt, a member of class Math, is preceded by Math.
        z = Math.sqrt(x*x + y*y);

        System.out.println("Hypotenuse of sides of lengths "
                + x + " and " + y + " is " +z);
    }
}

